package com.open.rbac.model.vo.sys;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import com.open.rbac.constant.BooleanType;
import com.open.rbac.model.vo.sys.group.RoleUpdate;

/**
 * 角色参数
 *
 * @author Riche's
 * @since 2022/8/23
 */
@Schema(name = "RoleVo", description = "角色参数")
@Getter
@Setter
public class RoleVo {

    @Schema(description = "角色ID")
    @NotBlank(message = "角色ID为必填项", groups = RoleUpdate.class)
    @Size(max = 36, message = "角色ID最长不能超过36个字符", groups = RoleUpdate.class)
    private String id;

    @Schema(description = "角色名称")
    @NotBlank(message = "角色名称为必填项")
    @Size(min = 2, max = 30, message = "角色名称长度在 2~30 之间")
    private String name;

    @Schema(description = "是否为系统内置", hidden = true)
    private BooleanType immutable;

    @Schema(description = "是否启用")
    private Boolean enable;

    @Schema(description = "备注")
    @Size(max = 255, message = "备注最长不能超过255个字符")
    private String remark;

}
